﻿#include <stdio.h>

//main13：do...while案例：水仙花
int main13(void)
{
	int index = 100;
	do
	{
		//1.将一个三位数拆解成个位，十位，百位；
		int a = 0, b = 0, c = 0;
		//2.百位；
		a = index / 100;
		//3.十位；878/10=87%10=7
		b = index / 10 % 10;
		//4.个位；
		c = index % 10;
		if (a * a * a + b * b * b + c * c * c == index)
		{
			printf("5.输出此水仙花数index为：%d\n", index);//153 370 371 407
		}
		index++;
	} while (index < 1000);
	return 0;
}